@extends('admin.layouts.app')
@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">专家管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="{{url('zadmin')}}">系统</a></li>
                                    <li><a href="{{url('zadmin/experts')}}">专家列表</a></li>
                                    <li class="active">修改专家</li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                            <h2 class="m-t-0 header-title">修改专家</h2>
                            <hr/>
                             @if(session('rs'))
                              <div class="alert alert-{{session('rs')['status']}}">
                                {{ session('rs')['msg'] }}
                              </div>
                              @endif
<div class="row">
		<div class="col-md-6">
    <form class="form-horizontal" role="form" action="{{url('zadmin/experts/'.$data->id)}}" method="post" enctype="multipart/form-data">{{ method_field('PUT') }}

    <div class="form-group">
      <label class="col-md-2 control-label">登录账号</label>
      <div class="col-md-10">
        <input type="text" class="form-control"  required="" value="{{object_get($data,'user.username')}}" readonly="">
      </div>
    </div>
                                   
    <div class="form-group">
      <label class="col-md-2 control-label">专家姓名</label>
      <div class="col-md-10">
        <input type="text" class="form-control"  required="" value="{{object_get($data,'user.truename')}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">Banner</label>
      <div class="col-md-6">
        <input type="file" class="form-control" name="banner" >
      </div>
      <div class="col-md-4">
        <img src="{{$data->banner}}" width="45" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-2 control-label">头像</label>
      <div class="col-md-6">
        <input type="file" class="form-control" name="avatar"  >
      </div>
      <div class="col-md-4">
        <img src="{{$data->user->avatar}}" width="45" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-2 control-label">电话</label>
      <div class="col-md-10">
        <input type="text" class="form-control"  required="" value="{{object_get($data,'user.mobile')}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">擅长领域</label>
      <div class="col-md-10">
        <input type="text" class="form-control" name="good_at" required="" value="{{$data->good_at}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">职称</label>
      <div class="col-md-10">
        <input type="text" class="form-control" name="rank" required="" value="{{$data->rank}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">星级</label>
      <div class="col-md-10">
        <input type="text" class="form-control" name="point" required="" value="{{$data->point}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">排序</label>
      <div class="col-md-10">
        <input type="text" class="form-control" name="weight" required="" value="{{$data->weight}}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">状态</label>
      <div class="col-md-10">
        <input type="radio"  name="status"  value="1" checked="">正常
        <input type="radio"  name="status"  value="0">停用
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-2 control-label">介绍</label>
      <div class="col-md-10">
        <textarea class="form-control" rows="5" name="contents">{{$data->contents}}</textarea>
      </div>
    </div>


                                              <div class="form-group text-center">
                                                  
                                                  <button type="submit" class="btn btn-info waves-effect waves-light">保存</button>
                                              </div>
                                              
                                              
  <input type="hidden" name="user_id" value="{{$data->user_id}}" />                          {{csrf_field()}}
  </form>
                                </div>
			                        	
			                        </div>

                             
			                        
                        			
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection
                        
                        
                        

                  
            
    
       

           



    
       
    
